{foreach $ak as $k=>$v}
<div class="layui-col-md1">
    <label class="layui-form-label">
        <input type="hidden" name="attr_key[]" value="{$v.attr_key}">
        <span class="x-red">*</span>{$v.attr_key}:
    </label>
</div>
<div class="layui-col-md2">
    <div class="layui-input-inline" lay-filter="type3_id">
        <select name="attr_value[]" lay-verify="required">
            {foreach $v->attr_value as $k2=>$v2}
            <option value="{$v2.attr_value}">{$v2.attr_value}</option>
            {/foreach}
        </select>
    </div>
</div>
{/foreach}